const mysql=require('mysql');
let connection=mysql.createPool({
  host     : 'rm-uf6hsi42u17lj6t8hmo.mysql.rds.aliyuncs.com',
  user     : 'root',
  password : 'Cjy199387',
  port: '3306',
  database:'demo'
});

function query(sql,callback){
  connection.getConnection(function(err,connection){
    connection.query(sql, function (err,rows) {
      callback(err,rows);
      connection.release();
    });
  });
}
module.exports = query;
